package com.szholly.pro.watergas_server.ps.data;

import java.util.HashMap;

import com.szholly.data.general.metadata.table.DefulatDomainTable;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;import com.szholly.data.general.Field;import com.szholly.data.general.InterceptorTableBase;import com.szholly.data.general.metadata.IBaseTable;import com.szholly.utils.spring.SpringBeanFactory;import org.springframework.stereotype.Component;import com.szholly.data.general.GlobalDataType;import com.szholly.data.general.RowBase;
/**
 * AlarmLevelSet
 */
@Component("AlarmLevelSet")
public class AlarmLevelSetTable extends InterceptorTableBase  implements IBaseTable{

	public final static String TABLE_NAME = "BC_ALARM_TM_SET";


	@Autowired
	private static SpringBeanFactory springBeanFactory;
	
	/**
	 * single ref
	 */
	public static AlarmLevelSetTable getSingleRef() {
		return (AlarmLevelSetTable) SpringBeanFactory.getBean("AlarmLevelSet");
	}

	@Override
	public String getMetadataTableName() {
		return TABLE_NAME;
	}

	@Override
	public String getMetadataTableAliasName() {
		return "AlarmLevelSet";
	}

	private HashMap<String, Field> fields;

	@Override
	protected HashMap<String, Field> fields() {
		if (fields == null) {
			fields = new HashMap<String, Field>();

			Field itemField = null;
			
			itemField = new Field();
			itemField.setFieldName(AlarmLevelSetRow.FIELD_LevelTwo);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(5);
			itemField.setFieldAliasName("等级二时长，单位为分钟");
			itemField.setAllowNull(true);
			itemField.setMaxLen(10);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(AlarmLevelSetRow.FIELD_LevelThree);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(6);
			itemField.setFieldAliasName("等级三时长，单位为分钟");
			itemField.setAllowNull(true);
			itemField.setMaxLen(10);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(AlarmLevelSetRow.FIELD_WwtpId);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(7);
			itemField.setFieldAliasName("污水厂ID");
			itemField.setAllowNull(true);
			itemField.setMaxLen(100);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(AlarmLevelSetRow.FIELD_Guid);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(8);
			itemField.setFieldAliasName("唯一码");
			itemField.setAllowNull(true);
			itemField.setMaxLen(100);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(AlarmLevelSetRow.FIELD_LevelOne);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(9);
			itemField.setFieldAliasName("等级一时长，单位为分钟");
			itemField.setAllowNull(true);
			itemField.setMaxLen(10);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
		}
		return fields;
	}

	@Override
	public String getTableGroup() {
		return "AlarmLevelSet";
	}
}